Updated failsafe to use same number as ;afk#2239
Merged
rpherbig merged 1 commit intocombat-trainer-health-thresholdfrom Feb 11, 2018
unknown repository
Merged
Updated failsafe to use same number as ;afk#2239rpherbig merged 1 commit intocombat-trainer-health-thresholdfrom unknown repository
rpherbig merged 1 commit intocombat-trainer-health-thresholdfrom
unknown repository
Conversation
rpherbig
reviewed
Dec 18, 2017
| def execute(game_state) | ||
| custom_require.call('tendme') if bleeding? && !Script.running?('tendme') | ||
| fput 'exit' if health < 40 | ||
| fput 'exit' if health < get_settings.health_threshold |
Contributor
There was a problem hiding this comment.
It's not as simple as using get_settings here because then it won't be using the same settings as the rest of combat-trainer (i.e. the script could have been executed with args). You'll want to pass the right settings into SafetyProcess (see line 2154).
Author
|
In this case I think it's fine because people don't override
health_threshold in their hunt yamls
…On Sun, Dec 17, 2017 at 9:24 PM, Robert Herbig ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In combat-trainer.lic
<#2239 (comment)>:
> @@ -712,7 +712,7 @@ class SafetyProcess
def execute(game_state)
custom_require.call('tendme') if bleeding? && !Script.running?('tendme')
- fput 'exit' if health < 40
+ fput 'exit' if health < get_settings.health_threshold
It's not as simple as using get_settings here because then it won't be
using the same settings as the rest of combat-trainer (i.e. the script
could have been executed with args). You'll want to pass the *right*
settings into SafetyProcess (see line 2154).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2239 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ARawoSPSSTNOAL8gvJ8RONHvSGkEXn9zks5tBczkgaJpZM4RE4j0>
.
|
Contributor
|
We don't really know if people do or not. I could see someone wanting to change the threshold for a safer or riskier hunt. |
Contributor
|
Can we push this and make an issue to extend it so it works in every yaml? This would be a great feature to have and it has been asked for. |
rpherbig
added a commit
that referenced
this pull request
Feb 12, 2018
* Updated failsafe to use same number as ;afk (#2239) * Use local settings to determine health_threshold
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.